import yaml

file = open("config.yaml", "r", encoding="utf-8")

y = yaml.load_all(file, Loader=yaml.FullLoader)
for data in y:
    print(data)
    for i in data:
        print(i)

# aproject = {
#     "name": "Silenthand",
#     "race": "Human",
#     "traits": ["ONE_HAND", "ONE_EYE"]
# }
#
# result = yaml.dump(aproject)
# print(result)

# obj1 = {"name": "James", "age": 20}
# obj2 = {"name": "Tom", "age": 20}
# with open(r"config.yaml", "w") as f:
#     yaml.dump_all([obj1, obj2], f)

